<!DOCTYPE html>
  <html>
  <head>
      <meta charset="utf-8">
      <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
      <title>个人中心</title>
      <link rel="stylesheet" type="text/css" href="../../css/api.css" />
      <link rel="stylesheet" type="text/css" href="../../css/common.css" />
      <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    	<link rel="stylesheet" type="text/css" href="../../css/aui-pull-refresh.css" />
      <style>
          html, body {width: 100%;min-height: 100%;background: #F3EFEE;}
          .aui-active .aui-bar-tab-label{
            color: #f5a51c
          }
          .login {height:240px;background-image: -webkit-linear-gradient(0deg, #f5c674, #ed824c);/*background-image: url(../../image/personal_bkg.jpg);background-repeat: no-repeat; background-size: cover;*/position: relative;}
      	.login .personal_logo {width: 4rem;height: 4rem;border-radius: 50%;margin: 0 auto 9px;/*position: absolute; top: 60px; left: 20px;*/}
      		.login .userinfo {position: absolute; top: 60px;text-align: center; left: 0; right: 0;}
      		.login .userinfo .title {font-size: 0.8rem; color: #fff;}

      		/* 设置条目 */
      		.item {height: 3rem;line-height: 3rem;padding-left: 0.7rem;background-color: #fff;}
      		.item_ico {float: left;width: 2.3rem;padding: 0.7rem 0.7rem 0.7rem 0;}
      		.item_arrow {float: right;width: 1.5rem;padding: 1rem 0.7rem 1rem 0;}
      		.item span {font-size: 0.7rem;}
          [v-cloak] {
              display: none;
          }
          .nickname_main{
            width: 90vw;
            margin:0 auto;
          }
          .nickname_input_name{
              border-bottom: 2px solid red !important;
              font-size: 0.8rem;
          }
          .aui-toast-content{
              color: #fff;
          }
      </style>
  </head>
  <body>
<div id="app" >
  <header id="header_top" class="aui-bar aui-bar-nav aui-bar-light">
    <a class="aui-pull-left" @click="goback()">
        <span class="aui-iconfont aui-icon-left"></span>
    </a>
    <div class="aui-title">营业时间</div>
    <div style="margin-right:-72%;color:#f23030" @click="setUserInfo">保存</div>

  </header>
  <div class="aui-refresh-content nickname_main">
      <input type="text" name="" :value=opentime   class="nickname_input_name" v-model="opentime">
  <div>
</div>
  </body>
  <script type="text/javascript" src="../../script/api.js"></script>
  <script type="text/javascript" src="../../script/zepto.js"></script>
  <script type="text/javascript" src="../../script/vue.min.js"></script>
  <script type="text/javascript" src="../../script/utils.js"></script>
  <script type="text/javascript" src="../../script/common.js"></script>
  <script type="text/javascript" src="../../script/aui-tab.js"></script>
  <script type="text/javascript" src="../../script/aui-scroll.js"></script>
  <script type="text/javascript" src="../../script/aui-pull-refresh.js"></script>
  <script type="text/javascript" src="../../script/aui-toast.js"></script>
  <script type="text/javascript">
      apiready = function(){
         var toast = new auiToast({});
        new Vue({
          el:'#app',
          data:{
            opentime:api.pageParam.msg
          },
          methods:{
            //修改接口
            setUserInfo:function(){
              var _this = this;
              api.ajax({
                  url:window.Url.Freestore_setInfo,
                  method: 'post',
                  data: {
                      values: {
                          token:$api.getStorage('token'),
                          business_time:_this.opentime
                      }
                  }
              },function(ret, err){
                  if (ret.re==1) {
                      toast.success({
                        title:ret.info,
                        duration:1000
                      })
                      setTimeout(function(){
                        api.execScript({
                            name: 'storeTheData',

                            script:'window.location.reload();'
                        });
                        _this.goback()
                      },1000)
                  } else {
                      toast.fail({
                        title:ret.info,
                        duration:1000
                      })
                  }
              });

            },
            goback:function(){
              api.closeWin();
            }
          },
          mounted:function(){

          }
        })





      };



  </script>
  </html>
